import json
from common import common
from PyQt5.QtWidgets import QMessageBox


class ReadJson:
    def __init__(self, filename):
        self.file = filename
        pass

    def paste_json(self):
        dict_json = {}
        file = common.Common.get_resource_path() + self.file
        if len(file) == 0:
            pass
        else:
            with open(file, 'r', encoding='utf8') as fp:
                dict_json = json.load(fp)
            print('这是文件中的json数据：', dict_json)
        return dict_json

